package com.tanhua.dubbo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tanhua.domain.db.User;
import com.tanhua.domain.db.UserInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserInfoMapper extends BaseMapper<UserInfo> {

    @Select("SELECT i.* FROM tb_black_list b INNER JOIN tb_user_info i \n" +
            "ON b.`black_user_id` = i.`id` WHERE b.`user_id`=#{userId}")
    Page<UserInfo> findBlackList(Page<UserInfo> page,@Param("userId") Long userId);
}
